import React from 'react';
import { connect } from 'dva';
import { Link, withRouter } from 'dva/router';
import { Layout } from 'antd';


import { layout, CustomBreadcrumb } from '../components';
import styles from './IndexPage.css';

const { SdnhubMenu, Nav } = layout;
const { Header, Content, Sider, Footer } = Layout;


function IndexPage({ children }) {
  return (
    <Layout>
      <Header>
        <Nav />
      </Header>
      <Content className={styles.content}>
        <CustomBreadcrumb />
        <Layout className={styles.wrapper}>
          <Sider className={styles.slider}>
            <SdnhubMenu />
          </Sider>
          <Content className={styles.showContent}>
            {children}
          </Content>
        </Layout>
      </Content>
      <Footer className={styles.footer}>
        <p>Copyright © 2017 The Project by <Link to="/">GSTA Cloud Compute Institute</Link>.</p>
      </Footer>
    </Layout>
  );
}


export default withRouter(connect()(IndexPage));
